package order;

import pizza.LDCheesePizza;
import pizza.LDPepperPizza;
import pizza.Pizza;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2023-03-15
 * Time: 20:13
 */

public class LDFactory implements AbsFactory{


    @Override
    public Pizza createPizza(String orderType) {
        System.out.println("使用的抽象工厂模式创建的pizza");
        Pizza pizza = null;
        if (orderType.equals("pepper")){
            pizza = new LDPepperPizza();
        }else if (orderType.equals("cheese")){
            pizza = new LDCheesePizza();
        }else {
            System.out.println("没有你要订购的pizza");
        }

        return pizza;
    }
}
